The SSE2 versions of the gamma <-> linear TRC functions can produce
slightly different results than the scalar ones. Consequently,
last commit didn't resolve all discrepancies between the main and
leftover samples (and didn't address the gamma -> linear
direction).
Use the same SSE2 TRC functions for converting the leftover
samples, rather than the scalar functions, to fix that.
while (samples--)
{
- *dst++ = babl_linear_to_gamma_2_2f (*src++);
+ float y = *src++;
+ *dst++ = linear_to_gamma_2_2_sse2 (splat4f (y))[0];
*dst++ = *src++;
}
}
while (samples--)
{
- *dst++ = babl_gamma_2_2_to_linear (*src++);
+ float y = *src++;
+ *dst++ = gamma_2_2_to_linear_sse2 (splat4f (y))[0];
*dst++ = *src++;
}
}
while (samples--)
{
- *dst++ = babl_linear_to_gamma_2_2f (*src++);
+ float y = *src++;
+ *dst++ = linear_to_gamma_2_2_sse2 (splat4f (y))[0];
}
}
while (samples--)
{
- *dst++ = babl_gamma_2_2_to_linear (*src++);
+ float y = *src++;
+ *dst++ = gamma_2_2_to_linear_sse2 (splat4f (y))[0];
}
}